<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>更改文档背景颜色</title>
<script>
  function changeColor(color) {
    document.bgColor = color;
  }
</script>
</head>
<body>
  <button onclick="changeColor('red')">red</button>
  <button onclick="changeColor('green')">green</button>
  <button onclick="changeColor('blue')">blue</button>
  <button onclick="changeColor('#c15f9a')">#c15f9a</button>
</body>
</html>
